<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>

<body>
  <div id="app">
    <input type="text" v-model="msg">
    <div>{{msg | upData}}</div>
  </div>
  <script src="../js/vue.js"></script>
  <script>
    Vue.filter("upData", (val) => { //全局过滤器
      // console.log(val);
      return val.charAt(0).toUpperCase() + val.slice(1);
    });
    const vm = new Vue({
      "el": "#app",
      "data": {
        "msg": ""
      },
      "methods": {},
      "directives": {},
      "computed": {},
      "watch": {},
      "filters": {
        lower(val) { //局部过滤器

        }       
      }
    });
  </script>
</body>


</html>